summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2023-06-21 10:32:21 +0200
committerlat9nq <22451773+lat9nq@users.noreply.github.com>2023-07-21 16:56:55 +0200
commit9de50d6194027bf4d757ef58f291763eacea6bfe (patch)
tree5563ab1ad22884c117199cf8ead9e82344e04f50
parentsettings: Define paired settings (diff)
downloadyuzu-9de50d6194027bf4d757ef58f291763eacea6bfe.tar
yuzu-9de50d6194027bf4d757ef58f291763eacea6bfe.tar.gz
yuzu-9de50d6194027bf4d757ef58f291763eacea6bfe.tar.bz2
yuzu-9de50d6194027bf4d757ef58f291763eacea6bfe.tar.lz
yuzu-9de50d6194027bf4d757ef58f291763eacea6bfe.tar.xz
yuzu-9de50d6194027bf4d757ef58f291763eacea6bfe.tar.zst
yuzu-9de50d6194027bf4d757ef58f291763eacea6bfe.zip
-rw-r--r--src/yuzu/configuration/configure_system.cpp14
-rw-r--r--src/yuzu/configuration/shared_widget.cpp4
2 files changed, 6 insertions, 12 deletions
diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp
index ef26fb6ce..cb708051e 100644
--- a/src/yuzu/configuration/configure_system.cpp
+++ b/src/yuzu/configuration/configure_system.cpp
@@ -107,18 +107,8 @@ void ConfigureSystem::Setup(const ConfigurationShared::Builder& builder) {
for (auto setting : settings) {
ConfigurationShared::Widget* widget = [this, setting, &builder]() {
- if (setting->Id() == Settings::values.custom_rtc.Id()) {
- // custom_rtc needs a DateTimeEdit (default is LineEdit), and a checkbox to manage
- // it and custom_rtc_enabled
- return builder.BuildWidget(setting, apply_funcs,
- &Settings::values.custom_rtc_enabled);
- } else if (setting->Id() == Settings::values.rng_seed.Id()) {
- // rng_seed needs a HexEdit (default is LineEdit), and a checkbox to manage
- // it and rng_seed_enabled
- return builder.BuildWidget(setting, apply_funcs,
- &Settings::values.rng_seed_enabled);
- } else if (setting->Id() == Settings::values.speed_limit.Id()) {
- // speed_limit needs a checkbox to set use_speed_limit, as well as a spinbox
+ if (setting->Id() == Settings::values.speed_limit.Id()) {
+ // speed_limit must be specified to translate the percentage
return builder.BuildWidget(setting, apply_funcs, &Settings::values.use_speed_limit,
ConfigurationShared::RequestType::SpinBox,
tr("%", "Limit speed percentage (e.g. 50%)"));
diff --git a/src/yuzu/configuration/shared_widget.cpp b/src/yuzu/configuration/shared_widget.cpp
index 7670475be..bbcee7488 100644
--- a/src/yuzu/configuration/shared_widget.cpp
+++ b/src/yuzu/configuration/shared_widget.cpp
@@ -345,6 +345,10 @@ void Widget::SetupComponent(const QString& label, std::function<void()>& load_fu
QLayout* layout = new QHBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
+ if (other_setting == nullptr) {
+ other_setting = setting.PairedSetting();
+ }
+
const bool require_checkbox =
other_setting != nullptr && other_setting->TypeId() == typeid(bool);